package main

import (
	"fmt"
	"net/http"
	"os"
)

func main() {
	resp, err := http.Get("http://baidu.com")
	if err != nil {
		fmt.Fprintf(os.Stderr, "request sending error: %v\n", err)
		return
	}
	defer resp.Body.Close()
	line := resp.Proto + " " + resp.Status
	fmt.Println("返回的第一行的内容:", line)
}
